
.macro cbm.and       rd, rs1, rs2, es
.insn r CUSTOM_0, 0, \es*32, \rd, \rs1, \rs2
.endm

.macro cbm.or        rd, rs1, rs2, es
.insn r CUSTOM_0, 1, \es*32, \rd, \rs1, \rs2
.endm

.macro cbm.srli       rd, rs1, imm, es
.insn i CUSTOM_1, 4, \rd, \rs1, (\imm & 0x3ff)+1024*(\es & 1)-2048*((\es >> 1) & 1)
.endm

.org 0x80
nop
nop
cbm.or    x5, x5, x0, 0
cbm.or    x5, x5, x0, 3
cbm.or    x6, x6, x0, 0
cbm.or    x6, x6, x0, 3
cbm.or    x12, x12, x0, 0
cbm.or    x12, x12, x0, 3
cbm.or    x13, x13, x0, 0
cbm.or    x13, x13, x0, 3
cbm.or    x31, x31, x0, 3
cbm.srli  x31, x31, 16, 3
cbm.and    x20, x5, x6, 3
xor        x20, x20, x31
nop
cbm.and    x21, x5, x13, 3
xor        x21, x21, x31
nop
cbm.and    x22, x12, x6, 3
xor        x21, x21, x22
nop
cbm.and    x23, x12, x13, 3
xor        x21, x21, x23
nop
nop
nop
nop
